tools: Fix wild memory allocations from c/s 250f0b4 and 85d78b4
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 May 2015 12:57:24 +0000 (13:57 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 21 May 2015 14:19:50 +0000 (15:19 +0100)
commit5cc5b25187eb36e8113f686289f3ad6cb5dd0cb3
treef99b7ae53fe1202da4fa913bfa2a5f9777ca3e8a
parentac695ccbe726c3bafdddc70c152fa387851cf9f0
tools: Fix wild memory allocations from c/s 250f0b4 and 85d78b4

These changesets cause the respective libxc functions to unconditonally
dereference their max_cpus/nodes parameters as part of initial memory
allocations.  It will fail at obtaining the correct number of cpus/nodes from
Xen, as the guest handles will not be NULL.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c
tools/misc/xenpm.c
tools/python/xen/lowlevel/xc/xc.c